
#   Include Makefile

# Compilers
#
# ANSI C Compiler
CC_COMP                 = gcc
# Optimization global flags
CC_GOPTFLAGS    =
# Lib global flags
CC_GLIBFLAGS    =
# Debbuging global flags
CC_GDBGFLAGS        =
# Warning global flags
CC_GWARNFLAGS   =
# Other global flags
CC_GCFLAGS      =
CC              = $(CC_COMP) $(CC_GOPTFLAGS) $(CC_GDBGFLAGS) $(CC_GLIBFLAGS) $(CC_GWARNFLAGS) $(CC_GCFLAGS)

# MPI Compiler
MPICC_COMP      = mpicc
# Optimization global flags
MPICC_GOPTFLAGS =
# Other global flags  
MPICC_GFLAGS        =
# Libs
MPICC_GLIBS         =
MPICC               = $(MPICC_COMP) $(MPICC_GOPTFLAGS) $(MPICC_GFLAGS) $(MPICC_GLIBS)

# Dependences
BIN      = $(SRC:.c=)
UOBJ     = $(USRC:.c=.o)
.SUFFIXES: .c .o .f .l .y .tex .aux

# Rules
CLEAN_LIST      = *.o core 
DEL_LIST        = $(TARGETS) *.o core 
START_LIST      = *.o *.err *.log core

.c.o:
	$(CC) -c  $<

default: all

clean:
	rm -f $(CLEAN_LIST)

del:
	rm -f $(DEL_LIST)

start:
	rm -f $(START_LIST)

# Sources
# Set here source file name. 
SRC         = pi_mpi.c
# Set here dependences for source file.
DEPEND      = 
# If you need auxiliar files .c for source file, set here its names.
USRC        = 

# Local flags
# Local debug flags
DBG_LFLAGS  =
# Local warning flags
WARN_LFLAGS =
# Local optmitation flags
OPT_LFLAGS  = -O3
# Other local flags
L_FLAGS         =
CFLAGS  = $(DBG_LFLAGS) $(WARN_LFLAGS) $(OPT_LFLAGS) $(L_FLAGS)

# Local libs 
L_LIBS          =
# Targets
TARGETS  = $(BIN)

all: $(TARGETS)

$(BIN): $(SRC) $(UOBJ)
	$(MPICC) -o $@ $(SRC) $(DEPEND) $(UOBJ) $(CFLAGS) $(L_LIBS)

